<!DOCTYPE html>
<html lang="en">

<!-- Head tag -->
<head><meta name="generator" content="Hexo 3.9.0">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="google-site-verification" content="xBT4GhYoi5qRD5tr338pgPM5OWHHIDR6mNg1a3euekI">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content>
    <meta name="keyword" content>
    <link rel="shortcut icon" href="/myblog/img/favicon.ico">

    <title>
        
          Ethan的博客 | Ethan&#39;s Blog
        
    </title>

    <link rel="canonical" href="http://reflectyi.gitee.io/myblog/myblog/">

    <!-- Bootstrap Core CSS -->
    <link rel="stylesheet" href="/myblog/css/bootstrap.min.css">

    <!-- Custom CSS -->
    <link rel="stylesheet" href="/myblog/css/hux-blog.min.css">

    <!-- Pygments Highlight CSS -->
    <link rel="stylesheet" href="/myblog/css/highlight.css">

    <!-- Custom Fonts -->
    <!-- <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"> -->
    <!-- Hux change font-awesome CDN to qiniu -->
    <link href="https://cdn.staticfile.org/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">


    <!-- Hux Delete, sad but pending in China
    <link href='http://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/
    css'>
    -->


    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

    <!-- ga & ba script hoook -->
    <script></script>
</head>


<!-- hack iOS CSS :active style -->
<body ontouchstart="">

    <!-- Navigation -->
<nav class="navbar navbar-default navbar-custom navbar-fixed-top">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header page-scroll">
            <button type="button" class="navbar-toggle">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/myblog/">Hi,Ethan</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <!-- Known Issue, found by Hux:
            <nav>'s height woule be hold on by its content.
            so, when navbar scale out, the <nav> will cover tags.
            also mask any touch event of tags, unfortunately.
        -->
        <div id="huxblog_navbar">
            <div class="navbar-collapse">
                <ul class="nav navbar-nav navbar-right">
                    <li>
                        <a href="/myblog/">首页</a>
                    </li>

                    

                        
                    

                        
                        <li>
                            <a href="/myblog/about/">目录</a>
                        </li>
                        
                    

                        
                        <li>
                            <a href="/myblog/archives/">时间轴</a>
                        </li>
                        
                    

                        
                        <li>
                            <a href="/myblog/tags/">标签</a>
                        </li>
                        
                    
                    
                </ul>
            </div>
        </div>
        <!-- /.navbar-collapse -->
    </div>
    <!-- /.container -->
</nav>
<script>
    // Drop Bootstarp low-performance Navbar
    // Use customize navbar with high-quality material design animation
    // in high-perf jank-free CSS3 implementation
    var $body   = document.body;
    var $toggle = document.querySelector('.navbar-toggle');
    var $navbar = document.querySelector('#huxblog_navbar');
    var $collapse = document.querySelector('.navbar-collapse');

    $toggle.addEventListener('click', handleMagic)
    function handleMagic(e){
        if ($navbar.className.indexOf('in') > 0) {
        // CLOSE
            $navbar.className = " ";
            // wait until animation end.
            setTimeout(function(){
                // prevent frequently toggle
                if($navbar.className.indexOf('in') < 0) {
                    $collapse.style.height = "0px"
                }
            },400)
        }else{
        // OPEN
            $collapse.style.height = "auto"
            $navbar.className += " in";
        }
    }
</script>


    <!-- Main Content -->
    <!-- Page Header -->
<header class="intro-header" style="background-image: url('/myblog/img/home-bg.jpg')">
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1 ">
                <div class="site-heading">
                    <h1>Hi,Ethan</h1>
                    <!--<hr class="small">-->
                    <span class="subheading">Welcome back!</span>
                </div>
            </div>
        </div>
    </div>
</header>



<!-- Main Content -->
<div class="container">
    <div class="row">
        

<!-- USE SIDEBAR -->
    <!-- Post Container -->
            <div class="
                col-lg-8 col-lg-offset-1
                col-md-8 col-md-offset-1
                col-sm-12
                col-xs-12
                post-container
            ">
            
                <!-- Main Content -->


<div class="post-preview">

    <a href="/myblog/2016/11/01/http/HTTP首部/">
        <h2 class="post-title">
            HTTP首部
        </h2>
        <h3 class="post-subtitle">
            HTTP报文首部和HTTP首部字段
        </h3>
        <div class="post-content-preview">
            HTTP首部一、HTTP报文首部
概述：HTTP协议的请求和响应报文中必然包含HTTP首部，首部内容为客户端和服务器分别处理请求和响应提供所需要的内容。
1、HTTP请求报文
HTTP请求报文首部，HTTP报文由方法、URI、HTTP版本、HTTP首部字段组成。


2、HTTP响应报文
HTTP响应报文首部，由HTTP版本、状态码(数字和原因短句)、HTTP首部字段三部分组成 二、HTTP......
        </div>
    </a>
    <p class="post-meta">
        Posted by Ethan on
        2016-11-01
    </p>

</div>
<hr>

<div class="post-preview">

    <a href="/myblog/2016/11/01/http/网络基础/">
        <h2 class="post-title">
            网络基础
        </h2>
        <h3 class="post-subtitle">
            TCP/IP分层管理，HTTP报文结构
        </h3>
        <div class="post-content-preview">
            网络基础一、TCP/IP分层管理
概述：TCP/IP协议族，按层次分为：应用层、传输层、网络层和数据链路层
1、应用层：决定了向用户提供应用服务时通信的活动。
TCP/IP协议族内预存了各类通用的应用服务
FTP(文件传输协议)和DNS(域名系统)服务就是其中两类


Http协议也处于该层。


2、传输层：提供处于网络连接中两台计算机之间的数据传递
传输层有两个性质不同的协议：TCP(传......
        </div>
    </a>
    <p class="post-meta">
        Posted by Ethan on
        2016-11-01
    </p>

</div>
<hr>

<div class="post-preview">

    <a href="/myblog/2016/11/01/http/HTTP首部字段详解/">
        <h2 class="post-title">
            HTTP首部字段详解
        </h2>
        <h3 class="post-subtitle">
            HTTP常用首部字段
        </h3>
        <div class="post-content-preview">
            一、HTTP/1.1 通用首部字段
1、Cache-Control 
概述：首部字段Cache-Control能够控制缓存的行为，操作缓存机制
Cache-Control: private, max-age=0, no-cache 
Cache-Control: no-cache使用 no-cache 指令的目的是为了防止从缓存中返回过期的资源。客户端将不会接收缓存过的响应。


2、Con......
        </div>
    </a>
    <p class="post-meta">
        Posted by Ethan on
        2016-11-01
    </p>

</div>
<hr>

<div class="post-preview">

    <a href="/myblog/2016/11/01/http/确保web安全的HTTPS/">
        <h2 class="post-title">
            HTTPS介绍
        </h2>
        <h3 class="post-subtitle">
            HTTP的缺点和HTTPS的介绍
        </h3>
        <div class="post-content-preview">
            一、HTTP的缺点
概述
通信使用明文，内容可能被窃听
不验证通信方的身份，可能遭遇伪装
无法验证报文的完整性，可能已遭篡改


1、通信使用明文可能被窃听
概述：HTTP本身不具备加密的功能，所以也无法做到对通信整体(HTTP通信的请求和响应内容)进行加密。即HTTP使用明文传输
TCP/IP是可能被窃听的网络。按照TCP/IP协议族的工作机制，通信内容在所有的通信线路上
经过加密处理的通......
        </div>
    </a>
    <p class="post-meta">
        Posted by Ethan on
        2016-11-01
    </p>

</div>
<hr>

<div class="post-preview">

    <a href="/myblog/2016/10/01/jvm/jvm执行/class文件结构/">
        <h2 class="post-title">
            class文件结构
        </h2>
        <h3 class="post-subtitle">
            字节码文件组成及其作用
        </h3>
        <div class="post-content-preview">
            class 文件结构
class文件结构，自己感觉最晦涩难懂的部分。主要是理解class文件编译成字节码以后的存储方法
本次讨论内容主要是class文件，不包括动态生成。
class文件整体上可以划分为Code和元数据，两部分概述：
Class文件是以8位字节为基础单位的二进制流，jvm规范规定，class文件结构类似于c语言的伪结构体(包含两种数据结构)
无符号数：基本数据类型。U1,U2......
        </div>
    </a>
    <p class="post-meta">
        Posted by Ethan on
        2016-10-01
    </p>

</div>
<hr>

<div class="post-preview">

    <a href="/myblog/2016/10/01/jvm/jvm执行/class加载器/">
        <h2 class="post-title">
            类加载器
        </h2>
        <h3 class="post-subtitle">
            类与类加载器，双亲委派
        </h3>
        <div class="post-content-preview">
            类加载器
概述：在class生命周期中的加载阶段。jvm规范，通过一个类的全限定名来获取类描述该类的二进制字节流。实现这个动作的就是类加载器一、类与类加载器
1、类加载器用于实现类的加载动作
2、类和类加载器两者共同确定该类在jvm中的唯一性
同一个class文件被同一个jvm中的两个不同加载器加载，那么生成的这两个类也是不相等的
判断两个类相等
Class对象的equals()、isAss......
        </div>
    </a>
    <p class="post-meta">
        Posted by Ethan on
        2016-10-01
    </p>

</div>
<hr>

<div class="post-preview">

    <a href="/myblog/2016/10/01/jvm/jvm执行/class加载时机/">
        <h2 class="post-title">
            Class类加载过程
        </h2>
        <h3 class="post-subtitle">
            class生命周期，加载时机
        </h3>
        <div class="post-content-preview">
            Class类加载过程
本文描述，使用class代指类和接口
class文件，并非特指磁盘中的文件，包括二进制字节流一、类加载的时机
1、class被加载到被卸载，生命周期的7个阶段
生命周期
加载
验证
准备
解析
初始化
使用
卸载


某些情况下，初始化之后才解析(动态绑定)


2、对于初始化阶段，虚拟机规定了有且只有5种情况必须立即初始化(主动引用)：
new、getstatic、p......
        </div>
    </a>
    <p class="post-meta">
        Posted by Ethan on
        2016-10-01
    </p>

</div>
<hr>

<div class="post-preview">

    <a href="/myblog/2016/10/01/jvm/jvm执行/基于栈的解释器/">
        <h2 class="post-title">
            jvm 执行引擎
        </h2>
        <h3 class="post-subtitle">
            基于栈的字节码解释执行引擎
        </h3>
        <div class="post-content-preview">
            基于栈的字节码解释执行引擎一、解释执行
概述：现在主流jvm都包含解释执行(解释执行)和编译执行(通过即时编译器MIT产生本地代码执行)
抽象语法树之前实现为一个半独立的编译器，java二、基于栈的指令集和基于寄存器的指令集


概述：
java输出的指令流，是基于操作数栈的指令集架构。指令流中的指令大部分都是零地址指令
纯粹的基于栈架构的指令集，应当都是零地址指令 
java出于对代码的校......
        </div>
    </a>
    <p class="post-meta">
        Posted by Ethan on
        2016-10-01
    </p>

</div>
<hr>

<div class="post-preview">

    <a href="/myblog/2016/10/01/jvm/jvm执行/方法调用/">
        <h2 class="post-title">
            jvm 方法调用
        </h2>
        <h3 class="post-subtitle">
            本节是方法调用，不涉及方法执行
        </h3>
        <div class="post-content-preview">
            方法调用
概述：本节是方法调用，不涉及方法执行
所有方法在class字节码文件中的常量池中都是符号引用，不是内存中的入口地址
在类加载和运行期间，才能知道这个方法的直接引用(内存地址)
方法的调用，分成解析调用(静态)和分派调用两大类(可能是静态也可能是动态)一、解析调用(静态)


概述：
类生命周期的解析阶段，就有一部分符号引用被转化成了直接引用。
这种情况的前提，就是程序在执行前，方法......
        </div>
    </a>
    <p class="post-meta">
        Posted by Ethan on
        2016-10-01
    </p>

</div>
<hr>

<div class="post-preview">

    <a href="/myblog/2016/10/01/jvm/jvm执行/运行时栈帧结构/">
        <h2 class="post-title">
            jvm 运行时栈帧
        </h2>
        <h3 class="post-subtitle">
            运行时栈帧组成，栈帧结构
        </h3>
        <div class="post-content-preview">
            运行时栈帧结构概述
1、栈帧是用于支持jvm运行时，调用方法和执行方法的数据结构。它是jvm运行时，栈中的栈元素
方法的局部变量表
操作数栈
动态链接
方法返回地址
附加信息


2、每一个方法从调用开始至执行完成的过程，都对应着一个栈帧从入栈到出栈的过程。
3、栈帧内存大小：在编译程序代码的过程中，栈帧中需要多大的局部变量表，多深的操作数栈都已经完全确定，并写在方法表的Code属性中，因此......
        </div>
    </a>
    <p class="post-meta">
        Posted by Ethan on
        2016-10-01
    </p>

</div>
<hr>



<!-- Pager -->

<ul class="pager">
    
    
        <li class="next">
            <a href="/myblog/page/2/">Older Posts &rarr;</a>
        </li>
    
</ul>



                <!-- 如果开启评论功能 -->
                

            </div>
    <!-- Sidebar Container -->
            <div class="
                col-lg-3 col-lg-offset-0
                col-md-3 col-md-offset-0
                col-sm-12
                col-xs-12
                sidebar-container
            ">
                <!-- Featured Tags -->
                
                <section>
                    <!-- no hr -->
                    <h5><a href="/myblog/tags/">FEATURED TAGS</a></h5>
                    <div class="tags">
                        
                            
                            <a href="/myblog/tags/#HTTP" title="HTTP" rel="4">HTTP</a>
                            
                        
                            
                            <a href="/myblog/tags/#jvm" title="jvm" rel="18">jvm</a>
                            
                        
                            
                            <a href="/myblog/tags/#class" title="class" rel="5">class</a>
                            
                        
                            
                            <a href="/myblog/tags/#jvm run-time" title="jvm run-time" rel="2">jvm run-time</a>
                            
                        
                            
                            <a href="/myblog/tags/#GC" title="GC" rel="3">GC</a>
                            
                        
                            
                            <a href="/myblog/tags/#Memory" title="Memory" rel="4">Memory</a>
                            
                        
                            
                            <a href="/myblog/tags/#Thread" title="Thread" rel="4">Thread</a>
                            
                        
                    </div>
                </section>
                

                <!-- Short About -->
                <section class="visible-md visible-lg">
                    <hr><h5><a href="/myblog/about/">ABOUT ME</a></h5>
                    <div class="short-about">

                        
                            <img src="/myblog//img/avatar.jpg" />
                        

                        
                            <p>我要成为魔法师!</p>
                        

                        <!-- SNS Link -->
                        <ul class="list-inline">
                            
                            
                            

                            

                            
                                <li>
                                    <a target="_blank" href="https://www.facebook.com/stateInstance">
                                        <span class="fa-stack fa-lg">
                                            <i class="fa fa-circle fa-stack-2x"></i>
                                            <i class="fa fa-facebook fa-stack-1x fa-inverse"></i>
                                        </span>
                                    </a>
                                </li>
                            

                            
                                <li>
                                    <a target="_blank"  href="https://github.com/stateInstance">
                                        <span class="fa-stack fa-lg">
                                            <i class="fa fa-circle fa-stack-2x"></i>
                                            <i class="fa fa-github fa-stack-1x fa-inverse"></i>
                                        </span>
                                    </a>
                                </li>
                            
                            
                            
                            
                        </ul>
                    </div>
                </section>
                
                <!-- Friends Blog -->
                
                <hr>
                <h5>FRIENDS</h5>
                <ul class="list-inline">

                    
                        <li><a href="http://blog.kaijun.rocks" target="_blank">Kaijun&#39;s Blog</a></li>
                    
                        <li><a href="http://huangxuan.me" target="_blank">Hux Blog</a></li>
                    
                        <li><a href="#" target="_blank">Foo</a></li>
                    
                        <li><a href="#" target="_blank">Bar</a></li>
                    
                        <li><a href="#" target="_blank">Example Friends</a></li>
                    
                        <li><a href="#" target="_blank">It helps SEO</a></li>
                    
                </ul>
                
            </div>
        
    </div>
</div>


    <!-- Footer -->
    <!-- Footer -->
<footer>
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                <ul class="list-inline text-center">
                
                
                

                

                
                    <li>
                        <a target="_blank" href="https://www.facebook.com/stateInstance">
                            <span class="fa-stack fa-lg">
                                <i class="fa fa-circle fa-stack-2x"></i>
                                <i class="fa fa-facebook fa-stack-1x fa-inverse"></i>
                            </span>
                        </a>
                    </li>
                

                
                    <li>
                        <a target="_blank"  href="https://github.com/stateInstance">
                            <span class="fa-stack fa-lg">
                                <i class="fa fa-circle fa-stack-2x"></i>
                                <i class="fa fa-github fa-stack-1x fa-inverse"></i>
                            </span>
                        </a>
                    </li>
                

                

                </ul>
                <p class="copyright text-muted">
                    Copyright &copy; Hi,Ethan 2019 
                    <br>
                    Theme by <a href="http://huangxuan.me">Hux</a> 
                    <span style="display: inline-block; margin: 0 5px;">
                        <i class="fa fa-heart"></i>
                    </span> 
                    Ported by <a href="http://blog.kaijun.rocks">Kaijun</a> | 
                    <iframe
                        style="margin-left: 2px; margin-bottom:-5px;"
                        frameborder="0" scrolling="0" width="91px" height="20px"
                        src="https://ghbtns.com/github-btn.html?user=kaijun&repo=hexo-theme-huxblog&type=star&count=true" >
                    </iframe>
                </p>
            </div>
        </div>
    </div>
</footer>

<!-- jQuery -->
<script src="/myblog/js/jquery.min.js"></script>

<!-- Bootstrap Core JavaScript -->
<script src="/myblog/js/bootstrap.min.js"></script>

<!-- Custom Theme JavaScript -->
<script src="/myblog/js/hux-blog.min.js"></script>


<!-- async load function -->
<script>
    function async(u, c) {
      var d = document, t = 'script',
          o = d.createElement(t),
          s = d.getElementsByTagName(t)[0];
      o.src = u;
      if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
      s.parentNode.insertBefore(o, s);
    }
</script>

<!-- 
     Because of the native support for backtick-style fenced code blocks 
     right within the Markdown is landed in Github Pages, 
     From V1.6, There is no need for Highlight.js, 
     so Huxblog drops it officially.

     - https://github.com/blog/2100-github-pages-now-faster-and-simpler-with-jekyll-3-0  
     - https://help.github.com/articles/creating-and-highlighting-code-blocks/    
-->
<!--
    <script>
        async("http://cdn.bootcss.com/highlight.js/8.6/highlight.min.js", function(){
            hljs.initHighlightingOnLoad();
        })
    </script>
    <link href="http://cdn.bootcss.com/highlight.js/8.6/styles/github.min.css" rel="stylesheet">
-->


<!-- jquery.tagcloud.js -->
<script>
    // only load tagcloud.js in tag.html
    if($('#tag_cloud').length !== 0){
        async("http://reflectyi.gitee.io/myblog/myblog/js/jquery.tagcloud.js",function(){
            $.fn.tagcloud.defaults = {
                //size: {start: 1, end: 1, unit: 'em'},
                color: {start: '#bbbbee', end: '#0085a1'},
            };
            $('#tag_cloud a').tagcloud();
        })
    }
</script>

<!--fastClick.js -->
<script>
    async("https://cdn.bootcss.com/fastclick/1.0.6/fastclick.min.js", function(){
        var $nav = document.querySelector("nav");
        if($nav) FastClick.attach($nav);
    })
</script>


<!-- Google Analytics -->


<script>
    // dynamic User by Hux
    var _gaId = 'UA-49627206-1';
    var _gaDomain = 'huangxuan.me';

    // Originial
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

    ga('create', _gaId, _gaDomain);
    ga('send', 'pageview');
</script>




<!-- Baidu Tongji -->

<script>
    // dynamic User by Hux
    var _baId = '4cc1f2d8f3067386cc5cdb626a202900';

    // Originial
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "//hm.baidu.com/hm.js?" + _baId;
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
</script>


<!-- Side Catalog -->





<!-- Image to hack wechat -->
<img src="http://reflectyi.gitee.io/myblog/myblog/img/icon_wechat.png" width="0" height="0" />
<!-- Migrate from head to bottom, no longer block render and still work -->

</body>

</html>
